/** 生成的文件，请勿修改 **/

export interface KeyValueList {
  key?: number;
  value?: number[];
}


/**
 * 后台菜单数据
 */
export interface Menu {
  _id?: number;
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  title?: string;
  icon?: string;
  badge?: string;
  target?: string;
  path?: string;
  link?: string;
  component?: string;
  renderMenu?: boolean;
  parent?: string;
  permission?: string[];
  cacheable?: boolean;
}


/**
 * 后台管理权限数据
 */
export interface Power {
  _id?: number;
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  code?: string;
  url?: string;
  menu?: Menu;
  menuId?: number;
  operation?: string[];
  explain?: string;
}


/**
 * 角色数据
 */
export interface Role {
  _id?: number;
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  code?: string;
  powers?: Power[];
  description?: string;
}


/**
 * 后台管理用户数据
 */
export interface User {
  _id?: number;
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  username?: string;
  avatar?: string;
  gender?: number;
  email?: string;
  password?: string;
  address?: string;
  role?: Role;
}


export interface PageUserResponse {
  items?: User[];
  total?: number;
  page?: number;
  limit?: number;
}


export interface LoginUserResponse {
  user?: User;
  token?: string;
  expires?: number;
}


export interface PageMenuResponse {
  items?: Menu[];
  total?: number;
  page?: number;
  limit?: number;
}


export interface PageRoleResponse {
  items?: Role[];
  total?: number;
  page?: number;
  limit?: number;
}


export interface PagePowerResponse {
  items?: Power[];
  total?: number;
  page?: number;
  limit?: number;
}


/**
 * 后台活动数据
 */
export interface Activity {
  _id?: number;
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  users?: User[];
}


export interface PageActivityResponse {
  items?: Activity[];
  total?: number;
  page?: number;
  limit?: number;
}


export interface PlayerModelData {
  _id?: number;
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  roles?: KeyValueList[];
  account?: string;
}


export interface RoleModelData {
  _id?: number;
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  playerUid?: number;
  name?: string;
  lastLoginTime?: number;
  lastLoginDay?: number;
  loginDay?: number;
  bagItems?: KeyValueList[];
  heros?: number[];
  heroFormations?: KeyValueList[];
  levelDataUids?: KeyValueList[];
}


export interface SearchUserInput {
  _id?: number;
  name?: MongoQueryScalar;
  email?: MongoQueryScalar;
  address?: MongoQueryScalar;
  username?: MongoQueryScalar;
  gender?: MongoQueryScalar;
}


export interface PageUserInput {
  page?: number;
  limit?: number;
  query?: SearchUserInput;
  sorter?: MongoQueryScalar;
}


export interface SearchMenuSortInput {
  query?: SearchMenuInput;
  sorter?: MongoQueryScalar;
}


export interface SearchMenuInput {
  _id?: number;
  name?: MongoQueryScalar;
}


export interface PageMenuInput {
  page?: number;
  limit?: number;
  query?: SearchMenuInput;
  sorter?: MongoQueryScalar;
}


export interface SearchRoleSortInput {
  query?: SearchRoleInput;
  sorter?: MongoQueryScalar;
}


export interface SearchRoleInput {
  _id?: number;
  name?: MongoQueryScalar;
}


export interface PageRoleInput {
  page?: number;
  limit?: number;
  query?: SearchRoleInput;
  sorter?: MongoQueryScalar;
}


export interface SearchPowerSortInput {
  query?: SearchPowerInput;
  sorter?: MongoQueryScalar;
}


export interface SearchPowerInput {
  _id?: number;
  name?: MongoQueryScalar;
}


export interface PagePowerInput {
  page?: number;
  limit?: number;
  query?: SearchPowerInput;
  sorter?: MongoQueryScalar;
}


export interface SearchActivityInput {
  _id?: number;
  name?: MongoQueryScalar;
}


export interface PageActivityInput {
  page?: number;
  limit?: number;
  query?: SearchActivityInput;
  sorter?: MongoQueryScalar;
}


export interface CreateUserInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  email?: string;
  password?: string;
  address?: string;
  username?: string;
  gender?: number;
  role?: number;
}


export interface UpdateUserInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  email?: string;
  password?: string;
  address?: string;
  username?: string;
  gender?: number;
  role?: number;
  id?: number;
}


export interface UpdatePasswordInput {
  id?: number;
  password?: string;
}


export interface LoginUserInput {
  email?: string;
  password?: string;
}


export interface CreateMenuInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  title?: string;
  icon?: string;
  badge?: string;
  target?: string;
  path?: string;
  link?: string;
  component?: string;
  renderMenu?: boolean;
  parent?: string;
  permission?: string[];
  cacheable?: boolean;
}


export interface UpdateMenuInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  title?: string;
  icon?: string;
  badge?: string;
  target?: string;
  path?: string;
  link?: string;
  component?: string;
  renderMenu?: boolean;
  parent?: string;
  permission?: string[];
  cacheable?: boolean;
  _id?: number;
}


export interface CreateRoleInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  powers?: number[];
  code?: string;
  description?: string;
}


export interface UpdateRoleInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  powers?: number[];
  code?: string;
  description?: string;
  _id?: number;
}


export interface CreatePowerInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  code?: string;
  menu?: number;
  operation?: Operation[];
  explain?: string;
}


export interface UpdatePowerInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  code?: string;
  menu?: number;
  operation?: Operation[];
  explain?: string;
  _id?: number;
}


export interface CreateActivityInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  users?: number[];
}


export interface UpdateActivityInput {
  isDel?: boolean;
  createTime?: number;
  sortCode?: number;
  name?: string;
  users?: number[];
  id?: number;
}


/**
 * 操作权限 SHOW-查看 ADD-添加 UPDATE-修改 DELETE-删除
 */
export enum Operation {
  SHOW = "SHOW",
  ADD = "ADD",
  UPDATE = "UPDATE",
  DELETE = "DELETE",
  EXPORT = "EXPORT",
  IMPORT = "IMPORT",
}

